Move test classloaders to Java#11911
Conversation
|
🎯 Code Coverage (details) 🔗 Commit SHA: 5dbe077 | Docs | Datadog PR Page | Give us feedback! |
There was a problem hiding this comment.
More details
Migration from Groovy to Java classloaders to resolve Java 8 compatibility issue caused by Groovy's synthetic accessor generation. Code is functionally equivalent, properly scoped, and follows test conventions. No regressions detected.
📊 Validated against 5 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 5dbe077 · What is Autotest? · Any feedback? Reach out in #autotest
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
sarahchen6
left a comment
There was a problem hiding this comment.
Cool! Should probably wait for Brice's eye though
bric3
left a comment
There was a problem hiding this comment.
Apart from the NonDelegatingExceptionClassLoader, it looks good to me.
| * super$N$loadClass(java.lang.Module, String)} accessor for {@code ClassLoader} subclasses, which | ||
| * references {@code java.lang.Module} and would break this Java 8 test suite. | ||
| */ | ||
| final class NonDelegatingExceptionClassLoader extends URLClassLoader { |
There was a problem hiding this comment.
note: The name is a tad misleading, ie it's not really delegating as URLClassLoader is not a delegate per se. It only returns the two Blocked... classes that are already available in the current (thread) classloader.
What Does This Do
Moves
ClassLoadertest helpers from Groovy to Java and removes the obsolete Java 8 Groovy compiler overrides.Motivation
Groovy generates synthetic accessors that reference
java.lang.Module, breaking Java 8-compatible test bytecode.Additional Notes
Validated by compiling both affected modules, running CI Visibility tests on Java 8, and running the affected exception-handler tests on Java 17.